<?php

namespace App\Http\Controllers\Home;

use App\Model\UserPoint;
use Illuminate\Http\Request;

class UserPointController extends BaseController
{
    public function index()
    {
        $items = UserPoint::where('user_id','=',$this->loginUserId())
            ->orderBy('created_at','desc')
            ->get();

        return $this->success($items);
    }
    public function show($id)
    {
        $item = UserPoint::where('user_id','=',$this->loginUserId())->find($id);

        return $this->success($item);
    }
}
